package com.ls.lserp.modules.material.service;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ls.lserp.common.persistence.Page;
import com.ls.lserp.common.service.CrudService;
import com.ls.lserp.modules.material.dao.MaterialStockDao;
import com.ls.lserp.modules.material.entity.MaterialStock;
@Service
@Transactional(readOnly = false)
public class MaterialStockService extends CrudService<MaterialStockDao,MaterialStock>{

	//合同
	 @Autowired
	    private MaterialStockDao materialStockDao ;

	    /**
		 * 查询父项
		 * @param page
		 * @param user
		 * @return
		 */
	    public Page<MaterialStock> findMaterialStockList(Page<MaterialStock> page, MaterialStock materialStock) {
	        // 生成数据权限过滤条件（dsf为dataScopeFilter的简写，在xml中使用 ${sqlMap.dsf}调用权限SQL）
	        //designOption.getSqlMap().put("dsf", dataScopeFilter(user.getCurrentUser(), "o", "a"));
	        // 设置分页参数
	    	materialStock.setPage(page);
	        // 执行分页查询
	        page.setList(materialStockDao.findList(materialStock));
	        return page;
	    }
		     
		
}
